package com.qk.management.scheduled;

import com.qk.management.service.ReportOverviewService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @文件名: RedisPreheat
 * @作者: DX
 * @创建日期: 2025/10/18
 * @描述:
 */
@Slf4j
@Component
public class RedisPreheat implements ApplicationRunner {

    @Autowired
    private ReportOverviewService reportOverviewService;

    @Override
    public void run(ApplicationArguments args) {

        try {
            reportOverviewService.reportOverviewWitchCache();
        } catch (Exception e) {
            log.error("数据缓存异常{}", e.getMessage());
        }

    }
}
